package com.vueperson.vueperson.t1.CreationalPattern.BuildingPattern.DirectorTest;

import com.vueperson.vueperson.t1.CreationalPattern.BuildingPattern.BuildActor.Actor;

public  abstract class ActorBuilder {
    protected static Actor actor=new Actor();

    public abstract void buildType();
    public abstract void buildSex();
    public abstract void buildFace();
    public abstract void buildCostume();
    public abstract void buildHairstyle();

    /**
     * 省略Director
     */
/*
    public static Actor construct(ActorBuilder ab){
        ab.buildType();
        ab.buildSex();
        ab.buildFace();
        ab.buildCostume();
        ab.buildHairstyle();
        return actor;
    }
    */

    /**
     *可以将construct()方法中的参数去掉
     */

    public Actor construct(){
        this.buildType();
        this.buildSex();
        this.buildFace();
        this.buildCostume();
        this.buildHairstyle();
        return actor;
    }


}
